﻿<Window x:Class="ApophysisCS.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:ApophysisCS"
        Title="Apophysis 7x C#" Height="791" Width="1000" MinWidth="320" MinHeight="240" ScrollViewer.VerticalScrollBarVisibility="Disabled" SnapsToDevicePixels="True" Icon="{StaticResource MainIcon}" Closing="MainWindow_Closing">
    <Window.CommandBindings>
        <CommandBinding Command="local:Commands.ShowEditor" Executed="OnExecuteShowEditor"/>
    </Window.CommandBindings>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <Menu x:Name="MainMenu" Grid.Row="0">
            <MenuItem Header="_File">
                <MenuItem Header="New..."/>
                <MenuItem Header="Open..." ToolTip="Open parameter file for browsing">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap2}" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Restore last autosave"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Save Parameters..." ToolTip="Save parameters to file">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap4}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Save All Parameters" ToolTip="Save all parameters to file"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Smooth Palette..." ToolTip="Create a smooth gradient from an image">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap35}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Gradient Browser..." ToolTip="Show the gradient browser">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap23}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Export UPR..." ToolTip="Save the flame in UltraFractal parameter format *** OUTDATED *** USE AT YOUR OWN RISK"/>
                <MenuItem Header="Export Flame..." ToolTip="Disabled in this &quot;3D hack&quot; version"/>
                <MenuItem Header="Export to Chaotica"/>
                <MenuItem Header="Import Gimp Parameters" ToolTip="Import Gimp parameters"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Random Batch" ToolTip="Create and load a file containing random flame parameters"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Exit" ToolTip="Quit Apophysis"/>
            </MenuItem>
            <MenuItem Header="Edit">
                <MenuItem Header="Undo" ToolTip="Undo last action">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap5}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Redo" ToolTip="Redo last action">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap6}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Copy" ToolTip="Copies a flame to the clipboard">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap8}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Paste">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap9}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Copy as UPR" ToolTip="Copy a UPR to the clipboard">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap24}"/>
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
            <MenuItem Header="_View">
                <MenuItem Header="Full Screen" ToolTip="Show the flame in fullscreen mode">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap53}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Command="local:Commands.ShowEditor" ToolTip="Show the Transform Editor">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap20}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Adjust" ToolTip="Show the Adjust window">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap19}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Gradient" ToolTip="Show the Gradient window">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap12}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Mutation" ToolTip="Show the Mutation window">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap18}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Curves">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap70}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Image Size">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap52}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Messages"/>
            </MenuItem>
            <MenuItem Header="Flame">
                <MenuItem Header="Reset Location" ToolTip="Recalculate flame location">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap13}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Randomize" ToolTip="Randomize flame parameters"/>
                <MenuItem Header="Random Weights" ToolTip="Randomize transform weights"/>
                <MenuItem Header="Equalize Weights" ToolTip="Set all weights to the same value"/>
                <MenuItem Header="Normalize Weights" ToolTip="Normalize weights from triangle areas"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Calculate Colors Values" ToolTip="Spread the transform color parameters evenly"/>
                <MenuItem Header="Randomize Color Values" ToolTip="Randomize color parameters"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Render flame..." ToolTip="Rander flame to disk">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap36}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Resume unfinished render..."/>
                <MenuItem Header="Render All Flames" ToolTip="Render all flames in a batch to disk"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Generate report..."/>
            </MenuItem>
            <MenuItem Header="Variation">
                <MenuItem Header="Random"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Built-in"/>
                <MenuItem Header="Plugins"/>
            </MenuItem>
            <MenuItem Header="Script">
                <MenuItem Header="Run script" ToolTip="Run the currently loaded script">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap44}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Stop script">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap37}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Open..." ToolTip="Open a script file">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap2}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Edit" ToolTip="Show Script Editor">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap43}"/>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Manage Favorites" ToolTip="Show the Favorites Manager"/>
                <MenuItem Header="Generate script from flame"/>
            </MenuItem>
            <MenuItem Header="Options">
                <MenuItem Header="Main toolbar" IsCheckable="True" ToolTip="Show or hide the toolbar"/>
                <MenuItem Header="Status Bar" IsCheckable="True" ToolTip="Show or hide the status bar"/>
                <MenuItem Header="File Contents" IsCheckable="True" ToolTip="Show or hide the file contents list"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Reset file content list width"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="Trace log..."/>
                <MenuItem Header="Options...">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap14}"/>
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
            <MenuItem Header="Help">
                <MenuItem Header="Contents" ToolTip="Open the Apophysis help file"/>
                <MenuItem Header="The Fractal Flame Algorithm"/>
                <MenuItem Header="Apophysis User Manual"/>
                <Separator Style="{StaticResource NarrowSeparator}"/>
                <MenuItem Header="About..." ToolTip="Show copyright and version information">
                    <MenuItem.Icon>
                        <Image Source="{StaticResource MainButtonBitmap48}"/>
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
        </Menu>
        
        <ToolBarTray Grid.Row="1">
            <ToolBar HorizontalAlignment="Left" VerticalAlignment="Top" Band="1" BandIndex="1">
                <Button ToolTip="New">
                    <Image Source="{StaticResource MainButtonBitmap66}"/>
                </Button>
                <Button ToolTip="Open...">
                    <Image Source="{StaticResource MainButtonBitmap2}"/>
                </Button>
                <Button ToolTip="Save parameters...">
                    <Image Source="{StaticResource MainButtonBitmap4}"/>
                </Button>
                <Separator/>
                <Button ToolTip="Render flame...">
                    <Image Source="{StaticResource MainButtonBitmap36}"/>
                </Button>
                <Button ToolTip="Render all flames...">
                    <Image Source="{StaticResource MainButtonBitmap65}"/>
                </Button>
                <Separator/>
                <RadioButton ToolTip="Classic view" IsChecked="True">
                    <Image Source="{StaticResource MainButtonBitmap55}"/>
                </RadioButton>
                <RadioButton ToolTip="Thumbnail view">
                    <Image Source="{StaticResource MainButtonBitmap56}"/>
                </RadioButton>
                <Separator/>
                <Button ToolTip="Undo">
                    <Image Source="{StaticResource MainButtonBitmap5}"/>
                </Button>
                <Button ToolTip="Redo">
                    <Image Source="{StaticResource MainButtonBitmap6}"/>
                </Button>
                <Separator/>
                <Button ToolTip="Reset location">
                    <Image Source="{StaticResource MainButtonBitmap13}"/>
                </Button>
                <Button ToolTip="Full screen">
                    <Image Source="{StaticResource MainButtonBitmap53}"/>
                </Button>
                <Separator/>
                <ComboBox ToolTip="Quality" SelectedIndex="0" IsEditable="True" Width="60" MinWidth="30">
                    <ComboBoxItem Content="5"/>
                    <ComboBoxItem Content="10"/>
                    <ComboBoxItem Content="15"/>
                    <ComboBoxItem Content="25"/>
                    <ComboBoxItem Content="50"/>
                    <ComboBoxItem Content="100"/>
                    <ComboBoxItem Content="150"/>
                    <ComboBoxItem Content="250"/>
                    <ComboBoxItem Content="500"/>
                    <ComboBoxItem Content="1000"/>
                </ComboBox>
                <Separator/>
                <Button ToolTip="Editor" Command="local:Commands.ShowEditor">
                    <Image Source="{StaticResource MainButtonBitmap20}"/>
                </Button>
                <Button ToolTip="Adjustment">
                    <Image Source="{StaticResource MainButtonBitmap19}"/>
                </Button>
                <Button ToolTip="Gradient">
                    <Image Source="{StaticResource MainButtonBitmap12}"/>
                </Button>
                <Button ToolTip="Curves">
                    <Image Source="{StaticResource MainButtonBitmap70}"/>
                </Button>
                <Button ToolTip="Mutate">
                    <Image Source="{StaticResource MainButtonBitmap18}"/>
                </Button>
                <Button ToolTip="Image size">
                    <Image Source="{StaticResource MainButtonBitmap52}"/>
                </Button>
                <Button ToolTip="Messages">
                    <Image Source="{StaticResource MainButtonBitmap64}"/>
                </Button>
                <Button ToolTip="Settings...">
                    <Image Source="{StaticResource MainButtonBitmap14}"/>
                </Button>
                <Separator/>
                <Button ToolTip="Show transparency">
                    <Image Source="{StaticResource MainButtonBitmap54}"/>
                </Button>
                <Button ToolTip="Show guidelines">
                    <Image Source="{StaticResource MainButtonBitmap69}"/>
                </Button>
                <Separator/>
                <Button ToolTip="Edit script">
                    <Image Source="{StaticResource MainButtonBitmap43}"/>
                </Button>
                <Button ToolTip="Run script">
                    <Image Source="{StaticResource MainButtonBitmap44}"/>
                </Button>
                <Button ToolTip="Stop script">
                    <Image Source="{StaticResource MainButtonBitmap37}"/>
                </Button>
                <Separator/>
                <Button ToolTip="Pan camera">
                    <Image Source="{StaticResource MainButtonBitmap49}"/>
                </Button>
                <Button ToolTip="Rotate camera">
                    <Image Source="{StaticResource MainButtonBitmap42}"/>
                </Button>
                <Button ToolTip="Zoom in">
                    <Image Source="{StaticResource MainButtonBitmap51}"/>
                </Button>
                <Button ToolTip="Zoom out">
                    <Image Source="{StaticResource MainButtonBitmap50}"/>
                </Button>
            </ToolBar>
        </ToolBarTray>
        
        <Grid Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <StackPanel Grid.Column="0" Width="160"/>
            <GridSplitter Grid.Column="1" Width="4" HorizontalAlignment="Stretch"/>
            <Canvas Grid.Column="2"/>
        </Grid>

        <StatusBar Grid.Row="3">
            <StatusBarItem Width="200">
                <TextBlock />
            </StatusBarItem>
            <Separator/>
            <StatusBarItem Width="161">
                <TextBlock />
            </StatusBarItem>
            <Separator/>
            <StatusBarItem Width="150">
                <TextBlock />
            </StatusBarItem>
            <Separator/>
            <StatusBarItem Width="Auto">
                <TextBlock />
            </StatusBarItem>
        </StatusBar>
    </Grid>
</Window>
